<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
</head>
    <style type="text/css">
        body ,ul{margin: 0; padding: 0;}
        ul{list-style:outside none none;     }
        #nav{
            width: 100%;
            height: 45px;
            background-color: #459df5;
        }
        #nav ul{
            margin: 0 auto;
            width: 1000px;
        }
        #nav li{
              display: inline-block;
              width: 120px;
              height: 45px;
              line-height: 45px;
              float: left;
         }
         #nav li a{
            text-decoration: none;
            color: white;
            display: block;
            text-align: center;
            font-size: 20px;
         }
          #nav li a:hover{
            background-color: #338ce6;
          }
         .active{
            background-color: #338ce6;
         }
        #wba{
            margin-right:3%;
        }
    </style>
{#<body onbeforeunload="myFunction()">#}
<body>
<div id="wba" align="right">
        <span>首页</span>&nbsp;&nbsp;
        {% if request.user.is_authenticated  %}
        <span>Welcome.{{ request.user }}</span>&nbsp;&nbsp;
        <span><a href="{% url 'Personal_Center_index' %}">个人中心</a></span>&nbsp;&nbsp;
            <span><a href = "{% url 'loginout'  %}">退出登录</a></span>&nbsp;&nbsp;
        {% else %}
        <span><a href="{% url 'new_login' %}">请登录</a></span>&nbsp;&nbsp;
        {% endif %}
</div>
 <nav id="nav">
        <ul>
           <li><a href="#" class="active">首页</a></li>
           <li><a href="#">安卓app</a></li>
           <li><a href="{% url 'agentip_index' %}">代理ip</a></li>
           <li><a href="#">用户</a></li>
           <li><a href="#">权威合作</a></li>
           <li><a href="#">手机百科</a></li>
        </ul>
      </nav>
<div id="formbackground" style="position:absolute; width:100%; height:100%; z-index:-1">
{% load static %}
    <img src="{% static images %}" alt="哈哈哈" height="100%" width="100%"/></div>

{#<script src=src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>#}

</body>
{#<script>#}
{#        function myFunction(){#}
{#            event.returnValue='asd';#}
{#            alert("===onbeforeunload===");#}
{#            if (event.clientX > document.body.clientWidth && event.clientY < 0 || event.altKey) {#}
{#                alert("你关闭了浏览器");#}
{#                return false;#}
{#            }#}
{#        }#}
{#</script>#}
</html>